Integrand size = 31, antiderivative size = 153 \[ \int \frac {\cos ^4(c+d x) (A+B \cos (c+d x))}{a+a \cos (c+d x)} \, dx=-\frac {3 (4 A-5 B) x}{8 a}+\frac {4 (A-B) \sin (c+d x)}{a d}-\frac {3 (4 A-5 B) \cos (c+d x) \sin (c+d x)}{8 a d}-\frac {(4 A-5 B) \cos ^3(c+d x) \sin (c+d x)}{4 a d}+\frac {(A-B) \cos ^4(c+d x) \sin (c+d x)}{d (a+a \cos (c+d x))}-\frac {4 (A-B) \sin ^3(c+d x)}{3 a d} \]
-3/8*(4*A-5*B)*x/a+4*(A-B)*sin(d*x+c)/a/d-3/8*(4*A-5*B)*cos(d*x+c)*sin(d*x +c)/a/d-1/4*(4*A-5*B)*cos(d*x+c)^3*sin(d*x+c)/a/d+(A-B)*cos(d*x+c)^4*sin(d *x+c)/d/(a+a*cos(d*x+c))-4/3*(A-B)*sin(d*x+c)^3/a/d
Leaf count is larger than twice the leaf count of optimal. \(311\) vs. \(2(153)=306\).
Time = 1.44 (sec) , antiderivative size = 311, normalized size of antiderivative = 2.03 \[ \int \frac {\cos ^4(c+d x) (A+B \cos (c+d x))}{a+a \cos (c+d x)} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \left (-72 (4 A-5 B) d x \cos \left (\frac {d x}{2}\right )-72 (4 A-5 B) d x \cos \left (c+\frac {d x}{2}\right )+552 A \sin \left (\frac {d x}{2}\right )-552 B \sin \left (\frac {d x}{2}\right )+168 A \sin \left (c+\frac {d x}{2}\right )-168 B \sin \left (c+\frac {d x}{2}\right )+144 A \sin \left (c+\frac {3 d x}{2}\right )-120 B \sin \left (c+\frac {3 d x}{2}\right )+144 A \sin \left (2 c+\frac {3 d x}{2}\right )-120 B \sin \left (2 c+\frac {3 d x}{2}\right )-16 A \sin \left (2 c+\frac {5 d x}{2}\right )+40 B \sin \left (2 c+\frac {5 d x}{2}\right )-16 A \sin \left (3 c+\frac {5 d x}{2}\right )+40 B \sin \left (3 c+\frac {5 d x}{2}\right )+8 A \sin \left (3 c+\frac {7 d x}{2}\right )-5 B \sin \left (3 c+\frac {7 d x}{2}\right )+8 A \sin \left (4 c+\frac {7 d x}{2}\right )-5 B \sin \left (4 c+\frac {7 d x}{2}\right )+3 B \sin \left (4 c+\frac {9 d x}{2}\right )+3 B \sin \left (5 c+\frac {9 d x}{2}\right )\right )}{192 a d (1+\cos (c+d x))} \]
(Cos[(c + d*x)/2]*Sec[c/2]*(-72*(4*A - 5*B)*d*x*Cos[(d*x)/2] - 72*(4*A - 5 *B)*d*x*Cos[c + (d*x)/2] + 552*A*Sin[(d*x)/2] - 552*B*Sin[(d*x)/2] + 168*A *Sin[c + (d*x)/2] - 168*B*Sin[c + (d*x)/2] + 144*A*Sin[c + (3*d*x)/2] - 12 0*B*Sin[c + (3*d*x)/2] + 144*A*Sin[2*c + (3*d*x)/2] - 120*B*Sin[2*c + (3*d *x)/2] - 16*A*Sin[2*c + (5*d*x)/2] + 40*B*Sin[2*c + (5*d*x)/2] - 16*A*Sin[ 3*c + (5*d*x)/2] + 40*B*Sin[3*c + (5*d*x)/2] + 8*A*Sin[3*c + (7*d*x)/2] - 5*B*Sin[3*c + (7*d*x)/2] + 8*A*Sin[4*c + (7*d*x)/2] - 5*B*Sin[4*c + (7*d*x )/2] + 3*B*Sin[4*c + (9*d*x)/2] + 3*B*Sin[5*c + (9*d*x)/2]))/(192*a*d*(1 + Cos[c + d*x]))
Time = 0.68 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.88, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.355, Rules used = {3042, 3456, 3042, 3227, 3042, 3113, 2009, 3115, 3042, 3115, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^4(c+d x) (A+B \cos (c+d x))}{a \cos (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{a \sin \left (c+d x+\frac {\pi }{2}\right )+a}dx\) |
\(\Big \downarrow \) 3456 |
\(\displaystyle \frac {\int \cos ^3(c+d x) (4 a (A-B)-a (4 A-5 B) \cos (c+d x))dx}{a^2}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (4 a (A-B)-a (4 A-5 B) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {4 a (A-B) \int \cos ^3(c+d x)dx-a (4 A-5 B) \int \cos ^4(c+d x)dx}{a^2}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {4 a (A-B) \int \sin \left (c+d x+\frac {\pi }{2}\right )^3dx-a (4 A-5 B) \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle \frac {-\frac {4 a (A-B) \int \left (1-\sin ^2(c+d x)\right )d(-\sin (c+d x))}{d}-a (4 A-5 B) \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-a (4 A-5 B) \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx-\frac {4 a (A-B) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {-a (4 A-5 B) \left (\frac {3}{4} \int \cos ^2(c+d x)dx+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {4 a (A-B) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-a (4 A-5 B) \left (\frac {3}{4} \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {4 a (A-B) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {-a (4 A-5 B) \left (\frac {3}{4} \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {4 a (A-B) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {-\frac {4 a (A-B) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}-a (4 A-5 B) \left (\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3}{4} \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\right )}{a^2}+\frac {(A-B) \sin (c+d x) \cos ^4(c+d x)}{d (a \cos (c+d x)+a)}\) |
((A - B)*Cos[c + d*x]^4*Sin[c + d*x])/(d*(a + a*Cos[c + d*x])) + ((-4*a*(A - B)*(-Sin[c + d*x] + Sin[c + d*x]^3/3))/d - a*(4*A - 5*B)*((Cos[c + d*x] ^3*Sin[c + d*x])/(4*d) + (3*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)))/4)) /a^2
3.1.38.3.1 Defintions of rubi rules used
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^n/( a*f*(2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n - 1)*Simp[A*(a*d*n - b*c*(m + 1)) - B*(a*c*m + b*d*n) - d*(a*B*(m - n) + A*b*(m + n + 1))*Sin[e + f*x], x], x], x] /; Fre eQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] & & NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && GtQ[n, 0] && IntegerQ[2*m] && (In tegerQ[2*n] || EqQ[c, 0])
Time = 0.93 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.63
method | result | size |
parallelrisch | \(\frac {\left (\left (-8 A +38 B \right ) \cos \left (2 d x +2 c \right )+\left (8 A -2 B \right ) \cos \left (3 d x +3 c \right )+3 B \cos \left (4 d x +4 c \right )+\left (136 A -82 B \right ) \cos \left (d x +c \right )+248 A -221 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-144 \left (A -\frac {5 B}{4}\right ) x d}{96 a d}\) | \(96\) |
derivativedivides | \(\frac {A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {2 \left (\left (\frac {25 B}{8}-\frac {5 A}{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {115 B}{24}-\frac {31 A}{6}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {109 B}{24}-\frac {25 A}{6}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {7 B}{8}-\frac {3 A}{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}-\frac {3 \left (4 A -5 B \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}}{d a}\) | \(143\) |
default | \(\frac {A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {2 \left (\left (\frac {25 B}{8}-\frac {5 A}{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {115 B}{24}-\frac {31 A}{6}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {109 B}{24}-\frac {25 A}{6}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\frac {7 B}{8}-\frac {3 A}{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}-\frac {3 \left (4 A -5 B \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}}{d a}\) | \(143\) |
risch | \(-\frac {3 x A}{2 a}+\frac {15 B x}{8 a}-\frac {7 i {\mathrm e}^{i \left (d x +c \right )} A}{8 a d}+\frac {7 i {\mathrm e}^{i \left (d x +c \right )} B}{8 a d}+\frac {7 i {\mathrm e}^{-i \left (d x +c \right )} A}{8 a d}-\frac {7 i {\mathrm e}^{-i \left (d x +c \right )} B}{8 a d}+\frac {2 i A}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}-\frac {2 i B}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}+\frac {B \sin \left (4 d x +4 c \right )}{32 a d}+\frac {\sin \left (3 d x +3 c \right ) A}{12 a d}-\frac {\sin \left (3 d x +3 c \right ) B}{12 a d}-\frac {\sin \left (2 d x +2 c \right ) A}{4 a d}+\frac {\sin \left (2 d x +2 c \right ) B}{2 a d}\) | \(228\) |
norman | \(\frac {\frac {\left (A -B \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {3 \left (4 A -5 B \right ) x}{8 a}+\frac {86 \left (A -B \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {15 \left (4 A -5 B \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a}-\frac {15 \left (4 A -5 B \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a}-\frac {15 \left (4 A -5 B \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a}-\frac {15 \left (4 A -5 B \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a}-\frac {3 \left (4 A -5 B \right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a}+\frac {5 \left (8 A -9 B \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a d}+\frac {\left (16 A -11 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}+\frac {\left (98 A -95 B \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}+\frac {\left (152 A -155 B \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(300\) |
1/96*(((-8*A+38*B)*cos(2*d*x+2*c)+(8*A-2*B)*cos(3*d*x+3*c)+3*B*cos(4*d*x+4 *c)+(136*A-82*B)*cos(d*x+c)+248*A-221*B)*tan(1/2*d*x+1/2*c)-144*(A-5/4*B)* x*d)/a/d
Time = 0.33 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.78 \[ \int \frac {\cos ^4(c+d x) (A+B \cos (c+d x))}{a+a \cos (c+d x)} \, dx=-\frac {9 \, {\left (4 \, A - 5 \, B\right )} d x \cos \left (d x + c\right ) + 9 \, {\left (4 \, A - 5 \, B\right )} d x - {\left (6 \, B \cos \left (d x + c\right )^{4} + 2 \, {\left (4 \, A - B\right )} \cos \left (d x + c\right )^{3} - {\left (4 \, A - 13 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (28 \, A - 19 \, B\right )} \cos \left (d x + c\right ) + 64 \, A - 64 \, B\right )} \sin \left (d x + c\right )}{24 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \]
-1/24*(9*(4*A - 5*B)*d*x*cos(d*x + c) + 9*(4*A - 5*B)*d*x - (6*B*cos(d*x + c)^4 + 2*(4*A - B)*cos(d*x + c)^3 - (4*A - 13*B)*cos(d*x + c)^2 + (28*A - 19*B)*cos(d*x + c) + 64*A - 64*B)*sin(d*x + c))/(a*d*cos(d*x + c) + a*d)
Leaf count of result is larger than twice the leaf count of optimal. 1794 vs. \(2 (134) = 268\).
Time = 1.98 (sec) , antiderivative size = 1794, normalized size of antiderivative = 11.73 \[ \int \frac {\cos ^4(c+d x) (A+B \cos (c+d x))}{a+a \cos (c+d x)} \, dx=\text {Too large to display} \]
Piecewise((-36*A*d*x*tan(c/2 + d*x/2)**8/(24*a*d*tan(c/2 + d*x/2)**8 + 96* a*d*tan(c/2 + d*x/2)**6 + 144*a*d*tan(c/2 + d*x/2)**4 + 96*a*d*tan(c/2 + d *x/2)**2 + 24*a*d) - 144*A*d*x*tan(c/2 + d*x/2)**6/(24*a*d*tan(c/2 + d*x/2 )**8 + 96*a*d*tan(c/2 + d*x/2)**6 + 144*a*d*tan(c/2 + d*x/2)**4 + 96*a*d*t an(c/2 + d*x/2)**2 + 24*a*d) - 216*A*d*x*tan(c/2 + d*x/2)**4/(24*a*d*tan(c /2 + d*x/2)**8 + 96*a*d*tan(c/2 + d*x/2)**6 + 144*a*d*tan(c/2 + d*x/2)**4 + 96*a*d*tan(c/2 + d*x/2)**2 + 24*a*d) - 144*A*d*x*tan(c/2 + d*x/2)**2/(24 *a*d*tan(c/2 + d*x/2)**8 + 96*a*d*tan(c/2 + d*x/2)**6 + 144*a*d*tan(c/2 + d*x/2)**4 + 96*a*d*tan(c/2 + d*x/2)**2 + 24*a*d) - 36*A*d*x/(24*a*d*tan(c/ 2 + d*x/2)**8 + 96*a*d*tan(c/2 + d*x/2)**6 + 144*a*d*tan(c/2 + d*x/2)**4 + 96*a*d*tan(c/2 + d*x/2)**2 + 24*a*d) + 24*A*tan(c/2 + d*x/2)**9/(24*a*d*t an(c/2 + d*x/2)**8 + 96*a*d*tan(c/2 + d*x/2)**6 + 144*a*d*tan(c/2 + d*x/2) **4 + 96*a*d*tan(c/2 + d*x/2)**2 + 24*a*d) + 216*A*tan(c/2 + d*x/2)**7/(24 *a*d*tan(c/2 + d*x/2)**8 + 96*a*d*tan(c/2 + d*x/2)**6 + 144*a*d*tan(c/2 + d*x/2)**4 + 96*a*d*tan(c/2 + d*x/2)**2 + 24*a*d) + 392*A*tan(c/2 + d*x/2)* *5/(24*a*d*tan(c/2 + d*x/2)**8 + 96*a*d*tan(c/2 + d*x/2)**6 + 144*a*d*tan( c/2 + d*x/2)**4 + 96*a*d*tan(c/2 + d*x/2)**2 + 24*a*d) + 296*A*tan(c/2 + d *x/2)**3/(24*a*d*tan(c/2 + d*x/2)**8 + 96*a*d*tan(c/2 + d*x/2)**6 + 144*a* d*tan(c/2 + d*x/2)**4 + 96*a*d*tan(c/2 + d*x/2)**2 + 24*a*d) + 96*A*tan(c/ 2 + d*x/2)/(24*a*d*tan(c/2 + d*x/2)**8 + 96*a*d*tan(c/2 + d*x/2)**6 + 1...
Leaf count of result is larger than twice the leaf count of optimal. 394 vs. \(2 (145) = 290\).
Time = 0.31 (sec) , antiderivative size = 394, normalized size of antiderivative = 2.58 \[ \int \frac {\cos ^4(c+d x) (A+B \cos (c+d x))}{a+a \cos (c+d x)} \, dx=-\frac {B {\left (\frac {\frac {21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {109 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {115 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {75 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a + \frac {4 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {6 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {4 \, a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} - \frac {45 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {12 \, \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - 4 \, A {\left (\frac {\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {16 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {15 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a + \frac {3 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} - \frac {9 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {3 \, \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{12 \, d} \]
-1/12*(B*((21*sin(d*x + c)/(cos(d*x + c) + 1) + 109*sin(d*x + c)^3/(cos(d* x + c) + 1)^3 + 115*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 75*sin(d*x + c)^ 7/(cos(d*x + c) + 1)^7)/(a + 4*a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 6*a *sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 4*a*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + a*sin(d*x + c)^8/(cos(d*x + c) + 1)^8) - 45*arctan(sin(d*x + c)/(co s(d*x + c) + 1))/a + 12*sin(d*x + c)/(a*(cos(d*x + c) + 1))) - 4*A*((9*sin (d*x + c)/(cos(d*x + c) + 1) + 16*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 15 *sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/(a + 3*a*sin(d*x + c)^2/(cos(d*x + c ) + 1)^2 + 3*a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + a*sin(d*x + c)^6/(cos (d*x + c) + 1)^6) - 9*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a + 3*sin(d* x + c)/(a*(cos(d*x + c) + 1))))/d
Time = 0.33 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.18 \[ \int \frac {\cos ^4(c+d x) (A+B \cos (c+d x))}{a+a \cos (c+d x)} \, dx=-\frac {\frac {9 \, {\left (d x + c\right )} {\left (4 \, A - 5 \, B\right )}}{a} - \frac {24 \, {\left (A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{a} - \frac {2 \, {\left (60 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 75 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 124 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 115 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 100 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 109 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 21 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4} a}}{24 \, d} \]
-1/24*(9*(d*x + c)*(4*A - 5*B)/a - 24*(A*tan(1/2*d*x + 1/2*c) - B*tan(1/2* d*x + 1/2*c))/a - 2*(60*A*tan(1/2*d*x + 1/2*c)^7 - 75*B*tan(1/2*d*x + 1/2* c)^7 + 124*A*tan(1/2*d*x + 1/2*c)^5 - 115*B*tan(1/2*d*x + 1/2*c)^5 + 100*A *tan(1/2*d*x + 1/2*c)^3 - 109*B*tan(1/2*d*x + 1/2*c)^3 + 36*A*tan(1/2*d*x + 1/2*c) - 21*B*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 + 1)^4*a))/ d
Time = 0.40 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.11 \[ \int \frac {\cos ^4(c+d x) (A+B \cos (c+d x))}{a+a \cos (c+d x)} \, dx=\frac {15\,B\,x}{8\,a}-\frac {3\,A\,x}{2\,a}+\frac {7\,A\,\sin \left (c+d\,x\right )}{4\,a\,d}-\frac {7\,B\,\sin \left (c+d\,x\right )}{4\,a\,d}-\frac {A\,\sin \left (2\,c+2\,d\,x\right )}{4\,a\,d}+\frac {A\,\sin \left (3\,c+3\,d\,x\right )}{12\,a\,d}+\frac {A\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a\,d}+\frac {B\,\sin \left (2\,c+2\,d\,x\right )}{2\,a\,d}-\frac {B\,\sin \left (3\,c+3\,d\,x\right )}{12\,a\,d}+\frac {B\,\sin \left (4\,c+4\,d\,x\right )}{32\,a\,d}-\frac {B\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a\,d} \]
(15*B*x)/(8*a) - (3*A*x)/(2*a) + (7*A*sin(c + d*x))/(4*a*d) - (7*B*sin(c + d*x))/(4*a*d) - (A*sin(2*c + 2*d*x))/(4*a*d) + (A*sin(3*c + 3*d*x))/(12*a *d) + (A*tan(c/2 + (d*x)/2))/(a*d) + (B*sin(2*c + 2*d*x))/(2*a*d) - (B*sin (3*c + 3*d*x))/(12*a*d) + (B*sin(4*c + 4*d*x))/(32*a*d) - (B*tan(c/2 + (d* x)/2))/(a*d)